Merge lp:~helene-verhaeghe27/cairo-dock-core/bugfix into lp:~cairo-dock-team/cairo-dock-core/cairo-dock

Proposed by Helene Verhaeghe
Status: Merged
Approved by: Matthieu Baerts
Approved revision: 1835
Merge reported by: Matthieu Baerts
Merged at revision: not available
Proposed branch: lp:~helene-verhaeghe27/cairo-dock-core/bugfix
Merge into: lp:~cairo-dock-team/cairo-dock-core/cairo-dock
Diff against target: 233 lines (+37/-58) (has conflicts)
8 files modified
src/cairo-dock-widget.c (+4/-3)
src/gldit/cairo-dock-data-renderer.c (+5/-6)
src/gldit/cairo-dock-dock-facility.c (+14/-37)
src/gldit/cairo-dock-dock-factory.c (+3/-3)
src/gldit/cairo-dock-gui-factory.c (+2/-2)
src/gldit/cairo-dock-icon-manager.c (+1/-2)
src/gldit/cairo-dock-image-buffer.c (+5/-5)
src/gldit/cairo-dock-themes-manager.c (+3/-0)
Text conflict in src/gldit/cairo-dock-themes-manager.c
To merge this branch: bzr merge lp:~helene-verhaeghe27/cairo-dock-core/bugfix
Reviewer Review Type Date Requested Status
Matthieu Baerts Approve
Review via email: mp+238063@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Matthieu Baerts (matttbe) wrote :

Hello and thank you for this merge request!

I'll review it by adding inline comments ;-)

Revision history for this message
Matthieu Baerts (matttbe) :
review: Needs Fixing
1835. By Helene Verhaeghe

dock-facility : rewriting the if

Revision history for this message
Matthieu Baerts (matttbe) wrote :

As discussed by mail, I'm going to import your changes and fixes some typos ;-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/cairo-dock-widget.c'
--- src/cairo-dock-widget.c 2012-10-07 00:38:20 +0000
+++ src/cairo-dock-widget.c 2014-10-11 22:59:26 +0000
@@ -38,9 +38,10 @@
3838
39void cairo_dock_widget_reload (CDWidget *pCdWidget)39void cairo_dock_widget_reload (CDWidget *pCdWidget)
40{40{
41 cd_debug ("%s (type %d)", __func__, pCdWidget->iType);41 if (pCdWidget)
42 if (pCdWidget && pCdWidget->reload)42 cd_debug ("%s (type %d)", __func__, pCdWidget->iType);
43 pCdWidget->reload (pCdWidget);43 if (pCdWidget->reload)
44 pCdWidget->reload (pCdWidget);
44}45}
4546
4647
4748
=== modified file 'src/gldit/cairo-dock-data-renderer.c'
--- src/gldit/cairo-dock-data-renderer.c 2014-05-02 14:40:05 +0000
+++ src/gldit/cairo-dock-data-renderer.c 2014-10-11 22:59:26 +0000
@@ -192,7 +192,6 @@
192 if (pRenderer->bWriteValues && pRenderer->bCanRenderValueAsText)192 if (pRenderer->bWriteValues && pRenderer->bCanRenderValueAsText)
193 {193 {
194 CairoDataRendererTextParam *pText;194 CairoDataRendererTextParam *pText;
195 int w, h, dw, dh;
196 pText = &pRenderer->pValuesText[iNumValue];195 pText = &pRenderer->pValuesText[iNumValue];
197 if (pText->fWidth != 0 && pText->fHeight != 0)196 if (pText->fWidth != 0 && pText->fHeight != 0)
198 {197 {
@@ -202,10 +201,10 @@
202 glColor3f (pText->pColor[0], pText->pColor[1], pText->pColor[2]);201 glColor3f (pText->pColor[0], pText->pColor[1], pText->pColor[2]);
203 glPushMatrix ();202 glPushMatrix ();
204 203
205 w = pText->fWidth * pRenderer->iWidth;204 int w = pText->fWidth * pRenderer->iWidth;
206 h = pText->fHeight * pRenderer->iHeight;205 int h = pText->fHeight * pRenderer->iHeight;
207 dw = w & 1;206 int dw = w & 1;
208 dh = h & 1;207 int dh = h & 1;
209 cairo_dock_draw_gl_text_at_position_in_area ((guchar *) pRenderer->cFormatBuffer,208 cairo_dock_draw_gl_text_at_position_in_area ((guchar *) pRenderer->cFormatBuffer,
210 pFont,209 pFont,
211 floor (pText->fX * iWidth) + .5*dw,210 floor (pText->fX * iWidth) + .5*dw,
@@ -629,9 +628,9 @@
629 g_return_val_if_fail (pRenderer != NULL, FALSE);628 g_return_val_if_fail (pRenderer != NULL, FALSE);
630 629
631 GldiContainer *pContainer = pIcon->pContainer;630 GldiContainer *pContainer = pIcon->pContainer;
632 cd_debug ("Render delayed: (%s, %dx%d)", pIcon->cName, pContainer->iWidth, pContainer->iHeight);
633 if (pContainer)631 if (pContainer)
634 {632 {
633 cd_debug ("Render delayed: (%s, %dx%d)", pIcon->cName, pContainer->iWidth, pContainer->iHeight);
635 if (pContainer->iWidth == 1 && pContainer->iHeight == 1) // container not yet resized, retry later634 if (pContainer->iWidth == 1 && pContainer->iHeight == 1) // container not yet resized, retry later
636 return TRUE;635 return TRUE;
637 636
638637
=== modified file 'src/gldit/cairo-dock-dock-facility.c'
--- src/gldit/cairo-dock-dock-facility.c 2014-08-17 22:38:25 +0000
+++ src/gldit/cairo-dock-dock-facility.c 2014-10-11 22:59:26 +0000
@@ -410,16 +410,9 @@
410 iWindowPositionY = H - iNewHeight + pDock->iMaxIconHeight;410 iWindowPositionY = H - iNewHeight + pDock->iMaxIconHeight;
411 411
412 int iScreenOffsetX = gldi_dock_get_screen_offset_x (pDock), iScreenOffsetY = gldi_dock_get_screen_offset_y (pDock);412 int iScreenOffsetX = gldi_dock_get_screen_offset_x (pDock), iScreenOffsetY = gldi_dock_get_screen_offset_y (pDock);
413 if (pDock->container.bIsHorizontal)413
414 {414 *iNewPositionX = iWindowPositionX + iScreenOffsetX;
415 *iNewPositionX = iWindowPositionX + iScreenOffsetX;415 *iNewPositionY = iWindowPositionY + iScreenOffsetY;
416 *iNewPositionY = iWindowPositionY + iScreenOffsetY;
417 }
418 else
419 {
420 *iNewPositionX = iWindowPositionX + iScreenOffsetX;
421 *iNewPositionY = iWindowPositionY + iScreenOffsetY;
422 }
423 //g_print ("POSITION : %d+%d ; %d+%d\n", iWindowPositionX, pDock->iScreenOffsetX, iWindowPositionY, pDock->iScreenOffsetY);416 //g_print ("POSITION : %d+%d ; %d+%d\n", iWindowPositionX, pDock->iScreenOffsetX, iWindowPositionY, pDock->iScreenOffsetY);
424}417}
425418
@@ -838,33 +831,17 @@
838 gboolean bMouseInsideDock = (x_abs >= 0 && x_abs <= pDock->fFlatDockWidth && iMouseX > 0 && iMouseX < iWidth);831 gboolean bMouseInsideDock = (x_abs >= 0 && x_abs <= pDock->fFlatDockWidth && iMouseX > 0 && iMouseX < iWidth);
839 //g_print ("bMouseInsideDock : %d (%d;%d/%.2f)\n", bMouseInsideDock, pDock->container.bInside, x_abs, pDock->fFlatDockWidth);832 //g_print ("bMouseInsideDock : %d (%d;%d/%.2f)\n", bMouseInsideDock, pDock->container.bInside, x_abs, pDock->fFlatDockWidth);
840833
841 if (! bMouseInsideDock) // hors du dock par les cotes.834 if (iMouseY >= 0 && iMouseY < iHeight) {
842 {835 if (! bMouseInsideDock) // hors du dock par les cotes.
843 if (/*cairo_dock_is_extended_dock (pDock) && */pDock->bAutoHide) // c'est penible de sortir du dock trop facilement avec l'auto-hide.836 {
844 {837 iMousePositionType = CAIRO_DOCK_MOUSE_ON_THE_EDGE;
845 if (iMouseY >= 0 && iMouseY < iHeight)838 }
846 iMousePositionType = CAIRO_DOCK_MOUSE_ON_THE_EDGE;839 else // et en plus on est dedans en y. // && pPointedIcon != NULL
847 else840 {
848 iMousePositionType = CAIRO_DOCK_MOUSE_OUTSIDE;841 //g_print ("on est dedans en x et en y (iMouseX=%d => x_abs=%d ; iMouseY=%d/%d)\n", iMouseX, x_abs, iMouseY, iHeight);
849 }842 //pDock->container.bInside = TRUE;
850 else843 iMousePositionType = CAIRO_DOCK_MOUSE_INSIDE;
851 {844 }
852 /**double fSideMargin = fabs (pDock->fAlign - .5) * (iWidth - pDock->fFlatDockWidth);
853 if (x_abs < - fSideMargin || x_abs > pDock->fFlatDockWidth + fSideMargin)
854 iMousePositionType = CAIRO_DOCK_MOUSE_OUTSIDE;
855 else
856 iMousePositionType = CAIRO_DOCK_MOUSE_ON_THE_EDGE;*/
857 if (iMouseY >= 0 && iMouseY < iHeight)
858 iMousePositionType = CAIRO_DOCK_MOUSE_ON_THE_EDGE;
859 else
860 iMousePositionType = CAIRO_DOCK_MOUSE_OUTSIDE;
861 }
862 }
863 else if (iMouseY >= 0 && iMouseY < iHeight) // et en plus on est dedans en y. // && pPointedIcon != NULL
864 {
865 //g_print ("on est dedans en x et en y (iMouseX=%d => x_abs=%d ; iMouseY=%d/%d)\n", iMouseX, x_abs, iMouseY, iHeight);
866 //pDock->container.bInside = TRUE;
867 iMousePositionType = CAIRO_DOCK_MOUSE_INSIDE;
868 }845 }
869 else846 else
870 iMousePositionType = CAIRO_DOCK_MOUSE_OUTSIDE;847 iMousePositionType = CAIRO_DOCK_MOUSE_OUTSIDE;
871848
=== modified file 'src/gldit/cairo-dock-dock-factory.c'
--- src/gldit/cairo-dock-dock-factory.c 2014-08-17 22:36:43 +0000
+++ src/gldit/cairo-dock-dock-factory.c 2014-10-11 22:59:26 +0000
@@ -1417,11 +1417,11 @@
1417 Y = x;1417 Y = x;
1418 X = y - pDock->container.iWidth/2;1418 X = y - pDock->container.iWidth/2;
1419 }1419 }
1420 int w, h;1420
1421 if (pDock->iInputState == CAIRO_DOCK_INPUT_AT_REST)1421 if (pDock->iInputState == CAIRO_DOCK_INPUT_AT_REST)
1422 {1422 {
1423 w = pDock->iMinDockWidth;1423 int w = pDock->iMinDockWidth;
1424 h = pDock->iMinDockHeight;1424 int h = pDock->iMinDockHeight;
1425 1425
1426 if (X <= -w/2 || X >= w/2)1426 if (X <= -w/2 || X >= w/2)
1427 return FALSE; // on n'accepte pas le drop.1427 return FALSE; // on n'accepte pas le drop.
14281428
=== modified file 'src/gldit/cairo-dock-gui-factory.c'
--- src/gldit/cairo-dock-gui-factory.c 2014-08-17 22:46:04 +0000
+++ src/gldit/cairo-dock-gui-factory.c 2014-10-11 22:59:26 +0000
@@ -841,7 +841,6 @@
841 cd_debug ("%s (%s, %s, %s)", __func__, cGroupName, cKeyName, cOriginalConfFilePath);841 cd_debug ("%s (%s, %s, %s)", __func__, cGroupName, cKeyName, cOriginalConfFilePath);
842 842
843 GSList *pList;843 GSList *pList;
844 gsize i = 0;
845 GtkWidget *pOneWidget = pSubWidgetList->data;844 GtkWidget *pOneWidget = pSubWidgetList->data;
846 GError *erreur = NULL;845 GError *erreur = NULL;
847 gsize length = 0;846 gsize length = 0;
@@ -858,6 +857,7 @@
858 857
859 if (GTK_IS_SPIN_BUTTON (pOneWidget) || GTK_IS_SCALE (pOneWidget))858 if (GTK_IS_SPIN_BUTTON (pOneWidget) || GTK_IS_SCALE (pOneWidget))
860 {859 {
860 gsize i = 0;
861 gboolean bIsSpin = GTK_IS_SPIN_BUTTON (pOneWidget);861 gboolean bIsSpin = GTK_IS_SPIN_BUTTON (pOneWidget);
862 double *fValuesList = g_key_file_get_double_list (pKeyFile, cGroupName, cKeyName, &length, &erreur);862 double *fValuesList = g_key_file_get_double_list (pKeyFile, cGroupName, cKeyName, &length, &erreur);
863 863
@@ -1724,9 +1724,9 @@
1724 // ModuleImage1724 // ModuleImage
1725 int iPreviewWidth, iPreviewHeight;1725 int iPreviewWidth, iPreviewHeight;
1726 GdkPixbuf *pPreviewPixbuf = NULL;1726 GdkPixbuf *pPreviewPixbuf = NULL;
1727 int w=200, h=200;
1728 if (gdk_pixbuf_get_file_info (pModule->pVisitCard->cPreviewFilePath, &iPreviewWidth, &iPreviewHeight) != NULL) // The return value is owned by GdkPixbuf and should not be freed.1727 if (gdk_pixbuf_get_file_info (pModule->pVisitCard->cPreviewFilePath, &iPreviewWidth, &iPreviewHeight) != NULL) // The return value is owned by GdkPixbuf and should not be freed.
1729 {1728 {
1729 int w=200, h=200;
1730 if (iPreviewWidth > w)1730 if (iPreviewWidth > w)
1731 {1731 {
1732 iPreviewHeight *= 1.*w/iPreviewWidth;1732 iPreviewHeight *= 1.*w/iPreviewWidth;
17331733
=== modified file 'src/gldit/cairo-dock-icon-manager.c'
--- src/gldit/cairo-dock-icon-manager.c 2014-10-11 18:51:13 +0000
+++ src/gldit/cairo-dock-icon-manager.c 2014-10-11 22:59:26 +0000
@@ -243,7 +243,6 @@
243 const gchar *cSuffixTab[4] = {".svg", ".png", ".xpm", NULL};243 const gchar *cSuffixTab[4] = {".svg", ".png", ".xpm", NULL};
244 gboolean bHasSuffix=FALSE, bFileFound=FALSE, bHasVersion=FALSE;244 gboolean bHasSuffix=FALSE, bFileFound=FALSE, bHasVersion=FALSE;
245 GtkIconInfo* pIconInfo = NULL;245 GtkIconInfo* pIconInfo = NULL;
246 int j;
247 gchar *str = strrchr (cFileName, '.');246 gchar *str = strrchr (cFileName, '.');
248 bHasSuffix = (str != NULL && g_ascii_isalpha (*(str+1))); // exemple : "firefox.svg", but not "firefox-3.0"247 bHasSuffix = (str != NULL && g_ascii_isalpha (*(str+1))); // exemple : "firefox.svg", but not "firefox-3.0"
249 bHasVersion = (str != NULL && g_ascii_isdigit (*(str+1)) && g_ascii_isdigit (*(str-1)) && str-1 != cFileName); // doit finir par x.y, x et y ayant autant de chiffres que l'on veut.248 bHasVersion = (str != NULL && g_ascii_isdigit (*(str+1)) && g_ascii_isdigit (*(str-1)) && str-1 != cFileName); // doit finir par x.y, x et y ayant autant de chiffres que l'on veut.
@@ -253,7 +252,7 @@
253 {252 {
254 if (! bHasSuffix) // test all the suffix one by one.253 if (! bHasSuffix) // test all the suffix one by one.
255 {254 {
256 j = 0;255 int j = 0;
257 while (cSuffixTab[j] != NULL)256 while (cSuffixTab[j] != NULL)
258 {257 {
259 g_string_printf (sIconPath, "%s/%s%s", g_cCurrentIconsPath, cFileName, cSuffixTab[j]);258 g_string_printf (sIconPath, "%s/%s%s", g_cCurrentIconsPath, cFileName, cSuffixTab[j]);
260259
=== modified file 'src/gldit/cairo-dock-image-buffer.c'
--- src/gldit/cairo-dock-image-buffer.c 2014-06-12 21:49:01 +0000
+++ src/gldit/cairo-dock-image-buffer.c 2014-10-11 22:59:26 +0000
@@ -517,13 +517,13 @@
517 {517 {
518 // on attache la texture au FBO.518 // on attache la texture au FBO.
519 ///if (pContainer->iWidth == 1 && pContainer->iHeight == 1) // container not yet fully resized519 ///if (pContainer->iWidth == 1 && pContainer->iHeight == 1) // container not yet fully resized
520 if (pContainer->iWidth < pImage->iWidth || pContainer->iHeight < pImage->iHeight)
521 {
522 return FALSE;
523 }
524 iWidth = pImage->iWidth, iHeight = pImage->iHeight;
525 if (pContainer == NULL)520 if (pContainer == NULL)
526 pContainer = g_pPrimaryContainer;521 pContainer = g_pPrimaryContainer;
522 if (pContainer->iWidth < pImage->iWidth || pContainer->iHeight < pImage->iHeight)
523 {
524 return FALSE;
525 }
526 iWidth = pImage->iWidth, iHeight = pImage->iHeight;
527 if (! gldi_gl_container_make_current (pContainer))527 if (! gldi_gl_container_make_current (pContainer))
528 {528 {
529 cd_warning ("couldn't set the opengl context");529 cd_warning ("couldn't set the opengl context");
530530
=== modified file 'src/gldit/cairo-dock-themes-manager.c'
--- src/gldit/cairo-dock-themes-manager.c 2014-10-11 22:09:58 +0000
+++ src/gldit/cairo-dock-themes-manager.c 2014-10-11 22:59:26 +0000
@@ -530,7 +530,10 @@
530 //\___________________ We load launcher if needed after having removed old ones.530 //\___________________ We load launcher if needed after having removed old ones.
531 if (! g_file_test (g_cCurrentLaunchersPath, G_FILE_TEST_EXISTS))531 if (! g_file_test (g_cCurrentLaunchersPath, G_FILE_TEST_EXISTS))
532 {532 {
533<<<<<<< TREE
533 g_string_printf (sCommand, "mkdir -p \"%s\"", g_cCurrentLaunchersPath);534 g_string_printf (sCommand, "mkdir -p \"%s\"", g_cCurrentLaunchersPath);
535=======
536>>>>>>> MERGE-SOURCE
534 _launch_cmd (sCommand->str);537 _launch_cmd (sCommand->str);
535 }538 }
536 if (g_pMainDock == NULL || bLoadLaunchers)539 if (g_pMainDock == NULL || bLoadLaunchers)

Subscribers

People subscribed via source and target branches