Ilya Skriblovsky avatar Ilya Skriblovsky committed 02432b0 Draft

Fixes for newer GCC and libdbus

Comments (0)

Files changed (8)

         _xftFont = XftFontOpen(_dpy, DefaultScreen(_dpy),
             XFT_FAMILY, XftTypeString, "sans",
             XFT_PIXEL_SIZE, XftTypeInteger, 15,
-            0
+            NULL
         );
     }
 

LauncherWindow.cpp

         XFT_FAMILY, XftTypeString, "sans",
         XFT_PIXEL_SIZE, XftTypeInteger, 23,
         XFT_WEIGHT, XftTypeInteger, XFT_WEIGHT_BOLD,
-        0
+        NULL
     );
 
 
 int checkpng(const struct dirent *ent)
 {
     static const char *png = ".png";
-    char *match = strstr(ent->d_name, png);
+    const char *match = strstr(ent->d_name, png);
     return match && (unsigned int)(match - ent->d_name) == strlen(ent->d_name) - strlen(png);
 }
 
 
 all: telescope
 
-#DEFINES = -DKDE
+#DEFINES = -DKDE -DDBUS
 DEFINES = -DMAEMO4 -DDBUS
 
 SOURCES = TeleWindow.cpp    \
 OBJS = $(SOURCES:%.cpp=%.o)
 
 telescope: $(OBJS)
-	g++ `pkg-config --libs $(DEPS)` -pthread $^ -o $@
+	g++ -pthread $^ -o $@ `pkg-config --libs $(DEPS)`
 
 .cpp.o:
 	g++ -c $(CFLAGS) $< -o $@
 //    printf("action:\t%s\n", action);
 //    printf("\n");
 
+    KeySym keySym = XStringToKeysym(keysym);
+    KeyCode keyCode = XKeysymToKeycode(dpy, keySym);
+
 
     Mapping *result = 0;
 
         goto finish;
     }
 
-    KeySym keySym = XStringToKeysym(keysym);
-    KeyCode keyCode = XKeysymToKeycode(dpy, keySym);
-
     if (keyCode == 0)
     {
         *error = "Invalid keysym";
     dp = opendir (DESKTOP_FILE_PATH);
     if (dp != NULL)
     {
-        while (ep = readdir (dp))
+        while ((ep = readdir (dp)))
         {
             // only insert .desktop file
             if (g_str_has_suffix(ep->d_name, ".desktop"))
     _xftFont = XftFontOpen(_dpy, scr,
         XFT_FAMILY, XftTypeString, "sans",
         XFT_PIXEL_SIZE, XftTypeInteger, Settings::instance()->fontSize(),
-        0);
+        NULL);
 
 
     // Double buffering pixmap
     recreateBuffer();
 
 
-    XRenderPictureAttributes pa;
-    pa.subwindow_mode = IncludeInferiors;
-
-
 
     _shown = false;
 
         for (LinkedList<DBusWatch*>::Iter i = _dbusWatches.head(); i; ++i)
             if (dbus_watch_get_enabled(*i))
             {
-                int dbusSocket = dbus_watch_get_fd(*i);
+                int dbusSocket = dbus_watch_get_unix_fd(*i);
                 FD_SET(dbusSocket, &fdset);
                 if (dbusSocket > maxSocket)
                     maxSocket = dbusSocket;
         if (select(maxSocket+1, &fdset, 0, 0, nearestTimeout ? &remaining : 0))
         {
             for (LinkedList<DBusWatch*>::Iter i = _dbusWatches.head(); i; ++i)
-                if (FD_ISSET(dbus_watch_get_fd(*i), &fdset))
+                if (FD_ISSET(dbus_watch_get_unix_fd(*i), &fdset))
                     dbus_watch_handle(*i, DBUS_WATCH_READABLE | DBUS_WATCH_WRITABLE);
         }
         else
             Picture *picture
         );
 
-        static Atom XTools::windowType(Window window);
+        static Atom windowType(Window window);
 };
 
 #endif
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.